package kr.co.pension.usr.pe.re.dao;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import kr.co.pension.utils.BaseDao;

import org.springframework.stereotype.Repository;

@Repository
public class ChkAdminDao extends BaseDao{
	
	public int insertAdminCnt(Map vo){
		return (int) getSqlMapClientTemplate().queryForObject("chk.insertAdminCnt",vo);
	}
	
	public int insertAdmin(Map vo){
		int result = (int) getSqlMapClientTemplate().insert("chk.insertAdmin",vo);
		Map data = new HashMap();
		data.put("adm_seq", result);
		getSqlMapClientTemplate().insert("chk.insertSeq",data);
		return result;
	}
	
	public void insertAdmHp(Map vo){
		getSqlMapClientTemplate().insert("chk.insertAdmHp",vo);
	}
	
	
	public int updateAdmin(Map vo){
		return (int) getSqlMapClientTemplate().update("chk.updateAdmin",vo);
	}
	
	public int deleteAdminHp(Map vo){
		return (int) getSqlMapClientTemplate().delete("chk.deleteAdminHp",vo);
	}
	
	
	
	public List admList(Map vo){
		return getSqlMapClientTemplate().queryForList("chk.admList",vo);
	}
	
	
	public int usrListCnt(Map vo){
		return (int) getSqlMapClientTemplate().queryForObject("chk.usrListCnt",vo);
	}
	public List usrList(Map vo){
		return getSqlMapClientTemplate().queryForList("chk.aUsrList",vo);
	}

	public List adminCode(Map vo){
		return getSqlMapClientTemplate().queryForList("chk.adminCode",vo);
	}
	
	public List samAdminList(Map vo){
		return getSqlMapClientTemplate().queryForList("chk.samAdminList",vo);
	}
	

	public List getAdmHp(Map vo){
		return getSqlMapClientTemplate().queryForList("chk.getAdmHp",vo);
	}
	
	
	public Map getAdminUsr(Map vo){
		return  (Map) getSqlMapClientTemplate().queryForObject("chk.getAdminUsr",vo);
	}
	
	
}
